import java.util.ArrayList;

public abstract class Sommet {
	private ArrayList<Sommet> voisinSortant;
	private String nom;
	private double pagerank;
	
	public Sommet(String nom){
		this.nom= nom;
		this.setPagerank(1);
		this.voisinSortant = new ArrayList<Sommet>();
	}
	public ArrayList<Sommet> getVoisinSortant() {
		return voisinSortant;
	}
	public void setVoisinSortant(ArrayList<Sommet> voisinSortant) {
		this.voisinSortant = voisinSortant;
	}
	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	
	public String toString() {
		StringBuilder sb = new StringBuilder();
		for (Sommet s : voisinSortant)
		{
		    sb.append(" "+s.nom+"  ");
		}

		return nom + ", VoisinSortant < " + (sb.toString())
				+ "> , ";
	}
	public double getPagerank() {
		return pagerank;
	}
	public void setPagerank(double p) {
		this.pagerank = p;
	}
	

}